/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package com.sc.vessel.info.model.breakdown.impl;

import com.sc.vessel.info.model.breakdown.BreakdownPackage;
import com.sc.vessel.info.model.breakdown.ConfigElement;
import com.sc.vessel.info.model.breakdown.ConfigElementSelected;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.internal.cdo.CDOObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Config Element Selected</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link com.sc.vessel.info.model.breakdown.impl.ConfigElementSelectedImpl#getConfigElement <em>Config Element</em>}</li>
 *   <li>{@link com.sc.vessel.info.model.breakdown.impl.ConfigElementSelectedImpl#getSelectedValue <em>Selected Value</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class ConfigElementSelectedImpl extends CDOObjectImpl implements ConfigElementSelected {
    /**
     * The default value of the '{@link #getSelectedValue() <em>Selected Value</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getSelectedValue()
     * @generated
     * @ordered
     */
    protected static final String SELECTED_VALUE_EDEFAULT = null;

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    protected ConfigElementSelectedImpl() {
        super();
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    protected EClass eStaticClass() {
        return BreakdownPackage.Literals.CONFIG_ELEMENT_SELECTED;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    protected int eStaticFeatureCount() {
        return 0;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public ConfigElement getConfigElement() {
        return (ConfigElement)eDynamicGet(BreakdownPackage.CONFIG_ELEMENT_SELECTED__CONFIG_ELEMENT, BreakdownPackage.Literals.CONFIG_ELEMENT_SELECTED__CONFIG_ELEMENT, true, true);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public ConfigElement basicGetConfigElement() {
        return (ConfigElement)eDynamicGet(BreakdownPackage.CONFIG_ELEMENT_SELECTED__CONFIG_ELEMENT, BreakdownPackage.Literals.CONFIG_ELEMENT_SELECTED__CONFIG_ELEMENT, false, true);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setConfigElement(ConfigElement newConfigElement) {
        eDynamicSet(BreakdownPackage.CONFIG_ELEMENT_SELECTED__CONFIG_ELEMENT, BreakdownPackage.Literals.CONFIG_ELEMENT_SELECTED__CONFIG_ELEMENT, newConfigElement);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public String getSelectedValue() {
        return (String)eDynamicGet(BreakdownPackage.CONFIG_ELEMENT_SELECTED__SELECTED_VALUE, BreakdownPackage.Literals.CONFIG_ELEMENT_SELECTED__SELECTED_VALUE, true, true);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setSelectedValue(String newSelectedValue) {
        eDynamicSet(BreakdownPackage.CONFIG_ELEMENT_SELECTED__SELECTED_VALUE, BreakdownPackage.Literals.CONFIG_ELEMENT_SELECTED__SELECTED_VALUE, newSelectedValue);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public Object eGet(int featureID, boolean resolve, boolean coreType) {
        switch (featureID) {
            case BreakdownPackage.CONFIG_ELEMENT_SELECTED__CONFIG_ELEMENT:
                if (resolve) return getConfigElement();
                return basicGetConfigElement();
            case BreakdownPackage.CONFIG_ELEMENT_SELECTED__SELECTED_VALUE:
                return getSelectedValue();
        }
        return super.eGet(featureID, resolve, coreType);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public void eSet(int featureID, Object newValue) {
        switch (featureID) {
            case BreakdownPackage.CONFIG_ELEMENT_SELECTED__CONFIG_ELEMENT:
                setConfigElement((ConfigElement)newValue);
                return;
            case BreakdownPackage.CONFIG_ELEMENT_SELECTED__SELECTED_VALUE:
                setSelectedValue((String)newValue);
                return;
        }
        super.eSet(featureID, newValue);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public void eUnset(int featureID) {
        switch (featureID) {
            case BreakdownPackage.CONFIG_ELEMENT_SELECTED__CONFIG_ELEMENT:
                setConfigElement((ConfigElement)null);
                return;
            case BreakdownPackage.CONFIG_ELEMENT_SELECTED__SELECTED_VALUE:
                setSelectedValue(SELECTED_VALUE_EDEFAULT);
                return;
        }
        super.eUnset(featureID);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public boolean eIsSet(int featureID) {
        switch (featureID) {
            case BreakdownPackage.CONFIG_ELEMENT_SELECTED__CONFIG_ELEMENT:
                return basicGetConfigElement() != null;
            case BreakdownPackage.CONFIG_ELEMENT_SELECTED__SELECTED_VALUE:
                return SELECTED_VALUE_EDEFAULT == null ? getSelectedValue() != null : !SELECTED_VALUE_EDEFAULT.equals(getSelectedValue());
        }
        return super.eIsSet(featureID);
    }

} //ConfigElementSelectedImpl
